﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d3="http://research.microsoft.com/DynamicDataDisplay/1.0"
    mc:Ignorable="d"
    x:Class="SeismicResponseSpectrum.Ui.TripartiteSpectrum"
    x:Name="UserControl"
    d:DesignWidth="640" d:DesignHeight="480" Background="White" Cursor="ScrollAll"
    MouseMove="TripartiteSpectrum_OnMouseMove" Width="{Binding ActualHeight, ElementName=UserControl}">
    <UserControl.ContextMenu>
        <ContextMenu>
            <MenuItem Header="Export Diagram" Click="ExportMenuItem_OnClick"/>
        </ContextMenu>
    </UserControl.ContextMenu>

    <Border BorderThickness="1" BorderBrush="Black">

        <Grid>

            <Grid  Margin="50,20,20,30">
                <Canvas x:Name="GridsCanvas" RenderTransformOrigin="0.5,0.5">
                    <Canvas.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform />
                            <SkewTransform />
                            <RotateTransform />
                            <TranslateTransform X="0" />
                        </TransformGroup>
                    </Canvas.RenderTransform>
                </Canvas>
                <Grid ClipToBounds="True">
                    <Canvas x:Name="SpectrumsCanvas" RenderTransformOrigin="0.5,0.5">
                        <Canvas.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform />
                                <SkewTransform />
                                <RotateTransform />
                                <TranslateTransform X="0" />
                            </TransformGroup>
                        </Canvas.RenderTransform>
                    </Canvas>

                </Grid>

            </Grid>
            <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Pseudo Velocity m/s"
                       VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
                <TextBlock.LayoutTransform>
                    <TransformGroup>
                        <ScaleTransform />
                        <SkewTransform />
                        <RotateTransform Angle="-90" />
                        <TranslateTransform />
                    </TransformGroup>
                </TextBlock.LayoutTransform>
            </TextBlock>
            <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="Natural Frequency, Hz"
                       VerticalAlignment="Bottom" RenderTransformOrigin="0.5,0.5" />
            <TextBlock HorizontalAlignment="Right" TextWrapping="Wrap" Text="   ResponseSpectrum.codeplex.com" VerticalAlignment="Bottom" Margin="5,5,0,0">
            	<TextBlock.LayoutTransform>
            		<TransformGroup>
            			<ScaleTransform/>
            			<SkewTransform/>
            			<RotateTransform Angle="-90"/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</TextBlock.LayoutTransform>
            </TextBlock>
        </Grid>
    </Border>
</UserControl>